package game;

import java.util.ArrayList;
import java.util.Collections;

public class LuckyCardStack {
	private ArrayList<LuckyCard> luckycards;
	
	public LuckyCardStack() {
		luckycards = new ArrayList<LuckyCard>();
		luckycards.add(new LuckyCard("You crashed into a pole in the parkinglot, and have to repair your car, it costs 3000:", "", -3000, false));
		luckycards.add(new LuckyCard("You have just won the lottery. You get 500!", "", 500, false));
		luckycards.add(new LuckyCard("Its the kings birthday, you get a freepass to jail.", "", 0, true));
		luckycards.add(new LuckyCard("Its the kings birthday, you get a freepass to jail.", "", 0, true));
		luckycards.add(new LuckyCard("You have been to the dentist, you have to pay 1000", "", -1000, false));
		luckycards.add(new LuckyCard("You got a parking ticket. Pay 500", "", -500, false));
		luckycards.add(new LuckyCard("Go to jail", "Move to jail", 0, false));
		luckycards.add(new LuckyCard("Move forward to start", "Move to start", 0, false));
		luckycards.add(new LuckyCard("Youve been out of the country and took to many cigarets home, pay the 200.", "", -200, false));
		luckycards.add(new LuckyCard("Youve gotten your dividends: Receive 1000.", "", 1000, false));
		luckycards.add(new LuckyCard("Its your birhtday and get a money present: Receive 500.", "", 500, false));
		luckycards.add(new LuckyCard("Pay your car insurance of 1000.", "", -1000, false));
		luckycards.add(new LuckyCard("Move forward to Grønningen, if you pass start, you get 4000", "Move to Grønningen", 0, false));
		luckycards.add(new LuckyCard("You recieve the Matador-scholarship. If you own more than 15.000, you get nothing, oterwise you get 40.000.", "Matador-scholarship", 0, false));
		luckycards.add(new LuckyCard("Move three fields backwards.", "Move three fields back", 0, false));
		luckycards.add(new LuckyCard("Move three fields forward", "Move three fields ahead", 0, false));
		luckycards.add(new LuckyCard("Move forward to Rådhuspladsen", "Move to Rådhuspladsen", 0, false));
		Collections.shuffle(luckycards);
	}
	
	public LuckyCardStack(LuckyCard card) {
		luckycards = new ArrayList<LuckyCard>();
		luckycards.add(card);
	}
	
	public LuckyCard pullCard() {
		return luckycards.get(0);
	}
	
	public void putCardLast() {
		luckycards.add(luckycards.get(0));
		luckycards.remove(0);
	}
	
	public void removeCard() {
		luckycards.remove(0);
	}
	
	public void putOutOfJailCardBack() {
		luckycards.add(new LuckyCard("Its the kings birthday, you get a freepass to jail.", "", 0, true));
	}
	
	public ArrayList<LuckyCard> getCardStack(){
		return luckycards;
	}
	
	public void setCardList(ArrayList<LuckyCard> cards){
		luckycards = cards;
	}
}
